package com.enzo.prms.common.base.to;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author prms1.0
 * 
 * @date:2012-5-15 09:54:16
 * @version :
 * 
 */
@MappedSuperclass
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class BaseEntity implements Serializable {
	private static final long serialVersionUID = -8501290044814283987L;
	@Column(name = "CREATEBY", nullable = false)
	private String createBy;
	
	@Column(name = "TMSTMPCRED", nullable = false,columnDefinition="TIMESTAMP")
	private Date createTs;
	
	@Column(name = "UPDATEBY", nullable = false)
	private String updateBy;
	
	@Column(name = "TMSTMPLSTUPD", nullable = false,columnDefinition="TIMESTAMP")
	private Date updateTs;
	
	@Version
	@Column(name = "VERSION", nullable = false)
	private Integer version;
    
	@Column(name="FLAG",nullable = true,columnDefinition = "INT default 1")
    private Integer flag;
	

	
	public String getCreateBy() {
		return createBy;
	}

	public Date getCreateTs() {
		return createTs;
	}

	public void setCreateTs(Date createTs) {
		this.createTs = createTs;
	}

	public Date getUpdateTs() {
		return updateTs;
	}

	public void setUpdateTs(Date updateTs) {
		this.updateTs = updateTs;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }
}
